In my last post I described issues that might stop your migration to a SQL Server Managed Instance (SQL MI). This covers configuration items that differ or are not supported in SQL MI. These likely won’t stop your migration, but they could slow you down if you aren’t ready for these changes.
As with previous issues discussed, testing your migration is key. Validate all of your settings and be prepared to make some changes during your migration process. Most of the incompatible options make sense when you think about the purpose of SQL MI – it is controlled by Microsoft. Hardware settings, local file access, high-availability settings, and auditing are configured differently or completely disabled.
Server Configuration
Since SQL MI is largely maintained by Microsoft, some server level configuration items are not available. I ran into a few of these during our migration. I did a quick test to find others that don’t support user changes. As a reminder, don’t change the default settings unless you have a specific reason. If you make any changes from the defaults, they need to be tested. It is very possible to hurt performance if you change the default settings.
SP_CONFIGURE
Many server settings are controlled with sp_configure. As with an on-prem instance, advanced options still need to be enabled in SQL MI. Run the following commands to see and enable configuration of all compatible server options.
1 2 3 4 |
EXEC sp_configure 'SHOW ADVANCED OPTIONS', 1 GO RECONFIGURE GO |
The following options throw errors when trying to configure them on SQL MI. Some of the error messages differ, but regardless of the exact reason, they are not configurable on SQL MI. Some of the options that failed are listed in the documentation as compatible with SQL MI, which emphasizes the need for testing.
It’s interesting to note that the failed option list expanded by one during my validation and testing over a one-week period. The option, “max UCS send boxcars” was not present during my first test. It showed up during final validation before publishing, so expect further changes and differences to compatible options in the future.
OptionName | ErrorMessage |
affinity I/O mask | Changes to server configuration option affinity I/O mask are not supported in SQL Database Managed Instances. |
affinity mask | Changes to server configuration option ‘affinity mask’ are not supported in this edition of SQL Server. |
affinity64 I/O mask | Changes to server configuration option affinity64 I/O mask are not supported in SQL Database Managed Instances. |
affinity64 mask | Changes to server configuration option ‘affinity64 mask’ are not supported in this edition of SQL Server. |
Agent XPs | Changes to server configuration option ‘Agent XPs’ are not supported in this edition of SQL Server. |
allow polybase export | Changes to server configuration option ‘allow polybase export’ are not supported in this edition of SQL Server. |
allow updates | Changes to server configuration option ‘allow updates’ are not supported in this edition of SQL Server. |
automatic soft-NUMA disabled | Changes to server configuration option automatic soft-NUMA disabled are not supported in SQL Database Managed Instances. |
c2 audit mode | Changes to server configuration option c2 audit mode are not supported in SQL Database Managed Instances. |
column encryption enclave type | Changes to server configuration option column encryption enclave type are not supported in SQL Database Managed Instances. |
common criteria compliance enabled | Changes to server configuration option common criteria compliance enabled are not supported in SQL Database Managed Instances. |
external xtp dll gen util enabled | Changes to server configuration option ‘external xtp dll gen util enabled’ are not supported in this edition of SQL Server. |
filestream access level | Changes to server configuration option ‘filestream access level’ are not supported in this edition of SQL Server. |
fill factor (%) | Changes to server configuration option fill factor (%) are not supported in SQL Database Managed Instances. |
hardware offload config | Changes to server configuration option hardware offload config are not supported in SQL Database Managed Instances. |
hardware offload enabled | Changes to server configuration option hardware offload enabled are not supported in SQL Database Managed Instances. |
hardware offload mode | Changes to server configuration option hardware offload mode are not supported in SQL Database Managed Instances. |
lightweight pooling | Changes to server configuration option lightweight pooling are not supported in SQL Database Managed Instances. |
locks | Changes to server configuration option locks are not supported in SQL Database Managed Instances. |
max server memory (MB) | Changes to server configuration option ‘max server memory (MB)’ are not supported in this edition of SQL Server. |
max UCS send boxcars | Changes to server configuration option max UCS send boxcars are not supported in SQL Database Managed Instances. |
min server memory (MB) | Changes to server configuration option ‘min server memory (MB)’ are not supported in this edition of SQL Server. |
open objects | Changes to server configuration option open objects are not supported in SQL Database Managed Instances. |
priority boost | Changes to server configuration option priority boost are not supported in SQL Database Managed Instances. |
remote access | Changes to server configuration option remote access are not supported in SQL Database Managed Instances. |
remote data archive | Changes to server configuration option ‘remote data archive’ are not supported in this edition of SQL Server. |
remote proc trans | Changes to server configuration option ‘remote proc trans’ are not supported in this edition of SQL Server. |
scan for startup procs | Changes to server configuration option scan for startup procs are not supported in SQL Database Managed Instances. |
set working set size | Changes to server configuration option set working set size are not supported in SQL Database Managed Instances. |
tempdb metadata memory-optimized | Changes to server configuration option tempdb metadata memory-optimized are not supported in SQL Database Managed Instances. |
user connections | Changes to server configuration option user connections are not supported in SQL Database Managed Instances. |
I used the following script to validate each option. It attempts to set the value of each option to the currently configured value so no actual changes are made – it just attempts to access each option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
SET NOCOUNT ON GO DROP TABLE IF EXISTS #InvalidOptions DECLARE @OPTIONS TABLE ( RowNumber int identity PRIMARY KEY CLUSTERED ,OptionName varchar(255) ,Minimum int ,Maximum int ,ConfigValue int ,RunValue int ) INSERT INTO @OPTIONS ( OptionName ,Minimum ,Maximum ,ConfigValue ,RunValue ) EXEC sp_configure CREATE TABLE #InvalidOptions ( OptionName varchar(255) primary key clustered ,ErrorMessage nvarchar(max) ) --SELECT * --FROM @OPTIONS DECLARE @SQL varchar(max) ,@OptionName varchar(255) ,@ConfigValue int ,@DropTable bit = 1 ,@Debug bit = 0 DECLARE crsOptions CURSOR FOR SELECT OptionName ,ConfigValue FROM @OPTIONS ORDER BY RowNumber OPEN crsOptions FETCH NEXT FROM crsOptions INTO @OptionName, @ConfigValue WHILE @@FETCH_STATUS = 0 BEGIN PRINT @OptionName SELECT @SQL = ' BEGIN TRY EXEC sp_configure ' + '''' + @OptionName + '''' + ',' + CONVERT(varchar(255),@ConfigValue) + ' END TRY BEGIN CATCH INSERT INTO #InvalidOptions ( OptionName ,ErrorMessage ) VALUES (' + '''' + @OptionName + '''' + ',ERROR_MESSAGE()) PRINT ' + '''' + 'Error configuring ' + @OptionName + '''' + ' PRINT ERROR_MESSAGE() END CATCH ' IF @Debug = 1 BEGIN PRINT @SQL END ELSE BEGIN EXEC(@SQL) END FETCH NEXT FROM crsOptions INTO @OptionName, @ConfigValue END CLOSE crsOptions DEALLOCATE crsOptions SELECT * FROM #InvalidOptions IF @DropTable = 1 BEGIN DROP TABLE #InvalidOptions END |
Server Configuration
Additional options can be set on SQL Server using ALTER SERVER CONFIGURATION.
1 2 |
ALTER SERVER CONFIGURATION SET MEMORY_OPTIMIZED ON; GO |
Documentation only lists SQL Server, not SQL MI for this command. I tested a few options to be sure and the results were as expected. Since these options largely deal with physical configurations, such as CPU affinity, they wouldn’t make sense in SQL MI.
1 2 |
Msg 41906, Level 16, State 12, Line 8 Statement 'ALTER SERVER CONFIGURATION SET PROCESS AFFINITY' is not supported in SQL Database Managed Instance. |
Tempdb
Tempdb options are very limited. The drive locations and number of files are controlled by Microsoft. In my, somewhat limited, testing it has not been an issue. Best practices are followed regarding the number of files and I expect any tempdb configuration to be updated as recommendations change over time.
I mentioned in a previous post that you can’t change the server configuration option, ‘tempdb metadata memory-optimized’, and that was also shown above. After testing and talking to our Microsoft technical contact, this is not an issue. The database engine has been updated to incorporate the option. In short, the latest version of the engine is more efficient. Tempdb metadata operations don’t stress the engine as in previous versions. I verified this using OStress (part of the RML tools) and was unable to cause latch waits by creating and dropping temp tables.
I used 100 threads for the stress test. Each thread created and dropped 10,000 temp tables. The entire process took about 45 minutes to finish and didn’t create a noticeable load on the server. That includes CPU, latch waits, and any adverse impact to other queries. The same test with an on-prem system, not configured with the tempdb metadata option, created noticeable load and adversely impacted the system. The load in SQL MI was similar to an on-prem system configured to use tempdb data in memory.
Database Scoped Configuration
Database scoped configurations are set using the ALTER DATABASE SCOPED CONFIGURATION command.
1 |
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0 |
I used a script similar to the previous server script to verify database scoped configurations. All options were allowed. As with server configurations, leave these at the default unless you have a specific reason to change them and test any changes you do make. Current settings can be viewed with the following DMV. Configurations are specific to each database.
1 2 |
SELECT * FROM sys.database_scoped_configurations |

Database Options
Database options are set with the ALTER DATABASE command.
1 2 |
ALTER DATABASE WideWorldImporters SET AUTO_CREATE_STATISTICS ON |
Like database scoped configurations, database options are set at a database level. Each database can have different settings based on the application need. Refer to the Microsoft documentation on supported options and test any that you use in your environment. Many of the options are not supported in SQL MI. There are too many to list, but the highlights follow. Note that these are listed as <option spec> (categories) and usually cover multiple options. Some option specs that are supported in SQL MI also have individual options not supported (e.g., AUTO_CLOSE). The following option specs are not supported in SQL MI:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<accelerated_database_recovery> <automatic_tuning_option> <containment_option> <database_mirroring_option> <date_correlation_optimization_option> <db_state_option> <db_update_option> <db_user_access_option> <external_access_option> FILESTREAM ( <FILESTREAM_option> ) <HADR_options> <mixed_page_allocation_option> <recovery_option> <remote_data_archive_option> <persistent_log_buffer_option> <service_broker_option> <suspend_for_snapshot_backup> <data_retention_policy> |
This is a side-by-side comparison of the documentation for SQL Server and SQL MI. You can see the large number of unsupported option specs.

Summary
Check any server and database configurations during your SQL MI testing. There are many server and database level options that aren’t supported. If you have automated processes to restore or setup environments, be sure to account for the new changes. You’ll also to be ready to update options over time, as my testing revealed ongoing changes.
References
- https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-configure-transact-sql?view=sql-server-ver16
- https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-server-configuration-transact-sql?view=sql-server-ver16
- https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql?view=sql-server-ver16
- https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options?view=sql-server-ver15&preserve-view=true
Load comments